//
//  QJPreviewOrderCell.m
//  QuanJieShopProject
//
//  Created by apple on 2018/2/23.
//  Copyright © 2018年 apple. All rights reserved.
//

#import "QJPreviewOrderCell.h"

@implementation QJPreviewOrderCell

- (void)awakeFromNib {
    [super awakeFromNib];
    // Initialization code
}
-(void)cellUpdateWithModel:(PreviewOrderModel *)model{
    if (model) {
        [self.cellImage sd_setImageWithURL:[NSURL URLWithString:[NSString stringWithFormat:@"%@",model.image_url]] placeholderImage:[UIImage imageNamed:@"noImage"]];
        self.cellTitle.text = [NSString stringWithoutNilFormart:model.goods_name];
        self.cellContent.text = [NSString stringWithFormat:@"数量:%@",model.amount];
        self.cellPrice.text = [NSString stringWithoutNilFormart:model.price];
    }
}

- (void)cellUpdateWithMineCollectModel:(MineCollectModel *)model{
    if (model) {
        [self.cellImage sd_setImageWithURL:[NSURL URLWithString:[NSString stringWithFormat:@"%@",model.original_img]] placeholderImage:[UIImage imageNamed:@"noImage"]];
        self.cellTitle.text = [NSString stringWithoutNilFormart:model.goods_name];
        self.cellContent.text = [NSString stringWithFormat:@"销量 %@",model.sales];
        self.cellPrice.text = [NSString stringWithFormat:@"￥ %@",model.price];
    }
}
- (void)cellUpdateWithMineOrderDetailModel:(MineOrderDetailModel *)model{
   
    [self.cellImage sd_setImageWithURL:[NSURL URLWithString:[NSString stringWithFormat:@"%@",model.image_url]] placeholderImage:[UIImage imageNamed:@"noImage"]];
    self.cellTitle.text = [NSString stringWithoutNilFormart:model.goods_name];
    self.cellContent.text = [NSString stringWithFormat:@"数量:%@",model.amount];
    self.cellPrice.text = [NSString stringWithFormat:@"￥ %@",model.price];
    
}


@end
